From: Giovanni Campagna Date: Wed, 22 May 2013 17:27:17 +0000 (+0200) Subject: workspace: don't use multiple later calls to propagate actualGeometry calls X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4126 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=727e4c0b377927d5d39b96a6d72163a8ed1ec92b;p=gnome-shell.git workspace: don't use multiple later calls to propagate actualGeometry calls Meta laters are invoked in reverse order of registration, so having multiple laters propagating the geometry cause all but the first one in the frame (which is usually wrong) to be ignored. Instead, queue at most one later call, and use the last set geometry in the callback. https://bugzilla.gnome.org/show_bug.cgi?id=700853 --- diff --git a/js/ui/workspace.js b/js/ui/workspace.js index bf5d277cf..713750423 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -989,10 +989,17 @@ const Workspace = new Lang.Class({ setActualGeometry: function(geom) { this._actualGeometry = geom; - Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() { + if (this._actualGeometryLater) + return; + + this._actualGeometryLater = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() { + let geom = this._actualGeometry; + this._dropRect.set_position(geom.x, geom.y); this._dropRect.set_size(geom.width, geom.height); this._updateWindowPositions(WindowPositionFlags.NONE); + + this._actualGeometryLater = 0; return false; })); },